<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <title>amis demo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=1"
    />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <link rel="stylesheet" href="./amis_jssdk_html_test/assets/amis-sdk/sdk.css" />
    <link rel="stylesheet" href="./amis_jssdk_html_test/assets/amis-sdk/helper.css" />
    <!-- 从 1.1.0 开始 sdk.css 将不支持 IE 11，如果要支持 IE11 请引用这个 css，并把前面那个删了 -->
    <!-- <link rel="stylesheet" href="sdk-ie11.css" /> -->
    <!-- 不过 amis 开发团队几乎没测试过 IE 11 下的效果，所以可能有细节功能用不了，如果发现请报 issue -->
    <style>
      html,
      body,
      .app-wrapper {
        position: relative;
        width: 100%;
        margin: 0;
        padding: 0;
      }
	  
	  .myclass1 {
	  background:url(./img/login-background.be8b4ff3.png) 0/100% 100% no-repeat;
	  color:red;
#	  text-decoration : underline;
	  }
    </style>
  </head>
  <body>
    <div id="root" class="app-wrapper">
	
	  <div id="div_1_json"> </div>

	</div>

	<script src="./js/jquery-2.2.2.js"></script>
    <script src="./amis_jssdk_html_test/assets/amis-sdk/sdk.js"></script>
    <script type="text/javascript">
	
	
	//var amis_1=null;
	var amisScoped_1=null;
	
	//var amis_2=null;
	var amisScoped_2=null;
	
      (function () {
         amis = amisRequire('amis/embed');
        // 通过替换下面这个配置来生成不同页面
        let amisJSON_1 ={
    "type": "page",
	"className": "myclass1",
    "body": [
        {
            "type": "page",
            "body": [
                {
                    "type": "flex",
                    "direction": "column",
                    "items": [
                        {
                            "type": "wrapper",
                            "style": {
                                "backgroundColor": "#1A5CFF",
                                "width": "80%",
                                "height": 100,
                                "margin": 5
                            },
                            "body": [
                                {
                                    "className": "w-full h-full m-0 p-0 bg-primary",
                                    "label": "库位打标",
                                    "type": "button",
                                    "onClick": "alert('点击了按钮'); "
                                }
                            ],
                            "size": ""
                        },
                        {
                            "type": "wrapper",
                            "style": {
                                "backgroundColor": "#1A5CFF",
                                "width": "80%",
                                "height": 100,
                                "margin": 5
                            },
                            "body": [
                                {
                                    "className": "w-full h-full m-0 p-0 bg-primary myclass1",
                                    "label": "产品打标",
                                    "type": "button",
                                    "onClick": "alert('点击了按钮'); "
                                }
                            ],
                            "size": ""
                        },
                        {
                            "type": "wrapper",
                            "style": {
                                "backgroundColor": "#1A5CFF",
                                "width": "80%",
                                "height": 100,
                                "margin": 5
                            },
                            "body": [
                                {
                                    "className": "w-full h-full m-0 p-0 bg-primary",
                                    "label": "库存盘点",
                                    "type": "button",
                                    "onClick": "alert('点击了按钮'); "
                                }
                            ],
                            "size": ""
                        },
                        {
                            "type": "wrapper",
                            "style": {
                                "backgroundColor": "#1A5CFF",
                                "width": "80%",
                                "height": 100,
                                "margin": 5
                            },
                            "body": [
                                {
                                    "className": "w-full h-full m-0 p-0 bg-primary",
                                    "label": "产品入库",
                                    "type": "button",
                                    "onClick": "alert('点击了按钮'); "
                                }
                            ],
                            "size": ""
                        },
                        {
                            "type": "wrapper",
                            "style": {
                                "backgroundColor": "#1A5CFF",
                                "width": "80%",
                                "height": 100,
                                "margin": 5
                            },
                            "body": [
                                {
                                    "className": "w-full h-full m-0 p-0 bg-primary",
                                    "label": "订单入库",
                                    "type": "button",
                                    "onClick": "alert('点击了按钮'); "
                                }
                            ],
                            "size": ""
                        }
                    ]
                }
            ]
        }
    ]
}
         amisScoped_1 = amis.embed('#div_1_json', amisJSON_1);
		 
		 

		 
		 
      })();



	  

	  function getVal_1(){

	    let compInstance1=amisScoped_1.getComponentByName("page1")
		let data=compInstance1.props.data
		 let name1_value=compInstance1.props.data.username
		 console.log("getVal_1 data="+JSON.stringify(data))
		 console.log("getVal_1 username_value="+JSON.stringify(name1_value))
	  }	 

	 
	 
	 
	 
	 
    </script>
  </body>
</html>